package com.rem.designPattern.proxy代理.jdk;

import java.math.BigDecimal;

/**
 * @author Rem
 * @date 2022-11-15
 */
public class Client {

    public static void main(String[] args) {

        ProxyFactory proxyFactory = new ProxyFactory();
        proxyFactory.setStation(new TrainStation());

        SellTickets proxyPoint = proxyFactory.getProxyObject();
        //class com.sun.proxy.$Proxy0
        System.out.println(proxyPoint.getClass());
        proxyPoint.sell(new BigDecimal(15));
    }
}